﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace YAPL.Util {
	public static class TypeHelper {
		public static T CreateType<T>(string assemblyPath, string typeName, params object[] parameters) {
			var assembly = Assembly.Load(assemblyPath);
			var type = assembly.GetType(typeName);
			var instance = (T) Activator.CreateInstance(type, parameters);
			return instance;
		}
	}
}
